<?php
/**
 * 这是一个用户查询的例子
 */
include 'common.php';

class userQueryRequest
{
    public $userId;
    public $cardNumber;
}

$req = new userQueryRequest();
$req->cardNumber = "330106200712020028";


$json = json_encode($req, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);


$publicReq = new publicRequesrt();
$publicReq->bizContent = $json;
$publicReq->charset = "utf-8";
$publicReq->companyId = "1005";
$publicReq->signType = "RSA2";
$publicReq->timestamp = "2023-12-04 09:32:10";


$json = json_encode($req, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);

$publicReqSign = "bizContent=$json&charset=$publicReq->charset&companyId=$publicReq->companyId&signType=$publicReq->signType&timestamp=$publicReq->timestamp";

$rsa2 = RsaSign($publicReqSign);

$publicReq->sign = $rsa2;

$publicReqBody = json_encode($publicReq, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);

echo "请求报文: $publicReqBody \r\n";

http_post("https://api.kylin-task.com/api/kycloud/open/v1.0/auth/query", $publicReqBody);

